package com.learn.rocketmq.simpletest;

import com.learn.rocketmq.simple.Consumer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @date 2021/8/16
 */
public class ConsumerTest {

    public static void main(String[] args) throws InterruptedException {

        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:consumer.xml");

        Consumer consumer = context.getBean(Consumer.class);

        System.out.println(consumer.getConsumer().getInstanceName());

        Thread.sleep(10000);
        consumer.destroy();
    }
}
